<template>
	<div class="go-home-btn" :class="[{'lowHeight':lowHeight}]"  @click="goHome"></div>
</template>

<script>
export default {
	data() {
		return {
			// pageHeight: window.innerHeight - 94,
			pageHeight: uni.getSystemInfoSync().windowHeight - 94,
		}
	},
	props:{
		homeType: {//返回的首页类型
			type: [String,Number],
			default: 0
		},
		lowHeight: {//无底部按钮,高度调低
			type: Boolean,
			default: false
		}
    },
	methods: {
		goHome() {
			var homeUrl = "/pages/index/index"//云精选首页
			this.$routeUtils.reLaunch({
				url: homeUrl
			});
		}
	}
};
</script>

<style>
	.go-home-btn{
		width: 88rpx;
		height: 88rpx;
		background-image: url('http://ss.migudm.cn/mgmall/public/icBackHome.png');
		background-size: contain;
		background-repeat: no-repeat;
		position: fixed;
		bottom: 254rpx;
		right: 30rpx;
		z-index: 10;
		margin-bottom: env(safe-area-inset-bottom);
	}
	.go-home-btn.lowHeight{
		bottom: 172rpx;
		margin-bottom: env(safe-area-inset-bottom);
	}
	.position-unset{
		position: unset;
	}
</style>
